rest_inspec |> 
  filter(boro != "Missing") |>
  group_by(boro)|>
  summarize(mean = mean(score, na.rm = TRUE)) |>
  plot_ly(x = ~boro, y = ~mean, color = ~boro, type = "bar", colors = "viridis")
rest_inspec |>
  filter(cuisine_description %in% c("American", "Chinese", "Latin (Cuban, Dominican, Puerto Rican, South & Central American)", "Pizza", "Italian", "Café/Coffee/Tea", "Mexican", "Japanese")) |>
  mutate(text_label = str_c("Resturant:", dba, "\nGrade:", grade, "\nScore", score))|>
  mutate(cuisine_description = recode(cuisine_description, 
                                      "Latin (Cuban, Dominican, Puerto Rican, South & Central American)" = "Latin", 
                                      "Café/Coffee/Tea" = "Coffee")) |>
    plot_ly(y = ~score, 
          x = ~cuisine_description, 
          type = "box", 
          color = ~cuisine_description,
          colors = "viridis",
          text = ~text_label)
## Warning: Ignoring 12697 observations
rest_inspec |> 
    filter(cuisine_description %in% c("American", "Chinese", "Latin (Cuban, Dominican, Puerto Rican, South & Central American)", "Pizza", "Italian", "Café/Coffee/Tea", "Mexican", "Japanese")) |>
  separate(inspection_date, into = c("year", "month", "date"))|>
  mutate(text_label = str_c("Resturant:", dba, "\nGrade:", grade, "\nScore", score))|>
  group_by(year, text_label)|>
  summarize(mean = mean(score, na.rm = TRUE)) |>
  plot_ly(x = ~year, y = ~mean, color = ~year, type = "scatter", mode = "markers", text = ~text_label, alpha = 0.5)
## `summarise()` has grouped output by 'year'. You can override using the `.groups`
## argument.
## Warning: Ignoring 1 observations